import requests
from bs4 import BeautifulSoup
url = f'https://tieba.baidu.com/p/7882177660?pn={1,2}'
resp = requests.get(url)
resp.encoding='UTF-8'
soup = BeautifulSoup(resp,'lxml')
print(soup.text)